import Vue from 'vue'
import Router from 'vue-router'
import MainComponent     			from '@/components/MainComponent.vue'
import MainHomePage 				from "@/components/MainHomePage.vue"
import MainClassification 			from "@/components/MainClassification.vue"

import SimpleComponent   			from '@/components/SimpleComponent.vue'
import SimpleMine 					from '@/components/SimpleMine.vue'
import SimpleShoppingCart 			from '@/components/SimpleShoppingCart.vue'

import GoodsShow                    from "@/components/GoodsShow"

import GoodsDetail 					from "@/components/GoodsDetail.vue"

import TypeShow                     from "../components/TypeShow"

Vue.use(Router)

export default new Router({
	mode:"history",
	linkExactActiveClass:"active",
	routes: [
		{path:"/",redirect:"/main"},
		{path:"/main",component:MainComponent,children:[
			{path:"",redirect:"Home/0"},
			{path:"Home/:isShow",name:"Home",component:MainHomePage,meta:{
				title:"蘑菇街-我的买手街"
			}},
			{path:"Classification/:isShow",name:"Classification",component:MainClassification,meta:{
				title:"全部商品分类"
			}},
		]},
		{path:"/simple",component:SimpleComponent,children:[
			{path:"",redirect:"Mine"},
			{path:"Mine",name:"Mine",component:SimpleMine,meta:{
				title:"个人中心"
			}},
			{path:"ShoppingCart",name:"ShoppingCart",component:SimpleShoppingCart,meta:{
				title:"购物车"
			}}
		]},
		{path:"/goodsShow/:isShow/:q",name:"goodsShow",component:GoodsShow},
		{path:"/goodsDetail/:itemId",name:"goodsDetail",component:GoodsDetail,meta:{
			title:"蘑菇街-我的买手街"
		}},
		{path:"/typeShow/:fcid/:title",name:"typeShow",component:TypeShow}
	]
})
